package com.taiji.dicom4platform.admin.controller;

import com.taiji.dicom4platform.admin.service.SysLoginService;
import com.taiji.dicom4platform.common.model.vo.UserVO;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author fanxl
 * @Date 2021/6/2
 **/
@RestController
@RequiredArgsConstructor
@RequestMapping("/oauth")
@Api(value = "login", tags = "登录")
public class LoginMainController {

    private final SysLoginService sysLoginService;

    @RequestMapping("/token")
    public UserVO loginByPassword(String username, String password) {
        return sysLoginService.loginByPassword(username,password);
    }
}
